package cn.keking.web.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 *  页面跳转
 * @author yudian-it
 * @date 2017/12/27
 */
@Controller
public class IndexController {
    Logger logger= LoggerFactory.getLogger(getClass());

    @RequestMapping(value = "index", method = RequestMethod.GET)
    public String go2Index(String param1){
        logger.info("直接打印中文试试?");
        logger.info("param1="+param1);
        System.out.println("param1="+param1);
		logger.info("file.encoding:"+System.getProperty("file.encoding"));
		logger.info("sun.jnu.encoding:"+System.getProperty("sun.jnu.encoding"));
        return "index";
    }

    @RequestMapping(value = "/", method = RequestMethod.GET)
    public String root() {
        return "redirect:/index";
    }
}
